package com.ux.example
{
	import com.greensock.TweenMax;
	
	import flash.display.Sprite;
	
	public class TweenMaxCustomTest extends Sprite
	{
		public var _t:Number = 0;
		private var s : Sprite;
		public function TweenMaxCustomTest()
		{
			super();
			
			s = new Sprite();
			addChild( s );
			
			s.graphics.beginFill( 0x000000, 1 );
			s.graphics.drawRect( 0,0,10,10 );
			s.graphics.endFill();
			
			TweenMax.to( s, 2, {x:100, y:100, yoyo:true, repeat:1} );
			
			TweenMax.to( this, 1, {onUpdate:onTween, _t:1} );
		}
		
		
		private function onTween():void
		{
			trace( _t );
		}
	}
}






